#ifndef TEXTBUBBLERENDERER_H_
#define TEXTBUBBLERENDERER_H_

#include <e32base.h>
#include <gdi.h>

class MPoint;
class Context;

class TextBubbleRenderer
	{
private:
	static TextBubbleRenderer*	instance;
	static TextBubbleRenderer*	littleInstance;
	
	CFbsBitmap*					bodyDownImg;
	CFbsBitmap* 				bodyImg;
	CFbsBitmap*					footDownImg;
	CFbsBitmap*					footImg;

	static TBuf<100> 			DEFAULT_TEXT;
	static float 				BUBBLE_TEXT_SIZE;
	static float 				TEXT_PADDING_LEFT;
	static float 				TEXT_PADDING_TOP;
	static float 				BOTTOM_SHADE;
	
	Context*					context;

private:
	TextBubbleRenderer(const Context& context, TBool b);
	
public:
	static TextBubbleRenderer& GetInstance(const Context& context);
	static TextBubbleRenderer& GetLittleInstance(const Context& context);
	
private:
	const CFbsBitmap& GetBodyImg(TBool b) const;
	const CFbsBitmap& GetFootImg(TBool b) const;
    
    //--绘制泡泡临时方法，有待改进--------
    /**
     * 绘制泡泡
     * @param canvas
     * @param mPoint 泡泡在屏幕MPoint点坐标对象
     * @param paramBoolean true:事件down泡泡,false:事件up泡泡
     * @return 泡泡按钮矩形坐标
     */
    RectF* DrawBubble(CGraphicsProxy& canvas, MPoint* mPoint, TBool paramBoolean);
    
    /**
     * 绘制泡泡
     * @param canvas
     * @param mPoint 泡泡在屏幕MPoint点坐标对象
     * @param hintStr 
     * @param paramBoolean true:事件down泡泡,false:事件up泡泡
     * @return 泡泡按钮矩形坐标
     */
    RectF* DrawBubble(CGraphicsProxy& canvas, MPoint* mPoint, const TDesC& hintStr, TBool paramBoolean);

	};

#endif /* TEXTBUBBLERENDERER_H_ */
